package bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.NamedQueries;
import org.hibernate.annotations.NamedQuery;

@Entity
@Table
@NamedQueries(value = { 
		@NamedQuery(name = "TypeCD.findByName", query="select t from TypeCD t where type =:typeName"),
		@NamedQuery(name = "TypeCD.findByID", query="select t from TypeCD t where id =:id"),
		@NamedQuery(name="TypeCD.findAll", query="select t from TypeCD t")
	})
public class TypeCD implements java.io.Serializable{
	private Long id;
	private String type;
	
	public TypeCD() {}

	public TypeCD(String type) {
		this.type = type;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	
	@Column
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	
}
